From: Marco Trevisan (TreviƱo) Date: Tue, 25 Oct 2022 02:47:08 +0000 (+0200) Subject: gdm/util: Do not handle fingerprint async errors in call X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~1^2~99 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0d24563296a5a53712fe72c8995a1322fd5b4121;p=gnome-shell.git gdm/util: Do not handle fingerprint async errors in call It's better to do this at caller level so that we have more control of what to do on errors. Part-of: --- diff --git a/js/gdm/util.js b/js/gdm/util.js index 36a63da76..6731200f6 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -170,7 +170,7 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._userName = userName; this.reauthenticating = false; - this._checkForFingerprintReader(); + this._checkForFingerprintReader().catch(logError); // If possible, reauthenticate an already running session, // so any session specific credentials get updated appropriately @@ -355,19 +355,17 @@ export class ShellUserVerifier extends Signals.EventEmitter { return; } - try { - const [device] = await this._fprintManager.GetDefaultDeviceAsync( - Gio.DBusCallFlags.NONE, this._cancellable); - const fprintDeviceProxy = new FprintDeviceProxy(Gio.DBus.system, - 'net.reactivated.Fprint', - device); - const fprintDeviceType = fprintDeviceProxy['scan-type']; - - this._fingerprintReaderType = fprintDeviceType === 'swipe' - ? FingerprintReaderType.SWIPE - : FingerprintReaderType.PRESS; - this._updateDefaultService(); - } catch (e) {} + const [device] = await this._fprintManager.GetDefaultDeviceAsync( + Gio.DBusCallFlags.NONE, this._cancellable); + const fprintDeviceProxy = new FprintDeviceProxy(Gio.DBus.system, + 'net.reactivated.Fprint', + device); + const fprintDeviceType = fprintDeviceProxy['scan-type']; + + this._fingerprintReaderType = fprintDeviceType === 'swipe' + ? FingerprintReaderType.SWIPE + : FingerprintReaderType.PRESS; + this._updateDefaultService(); } _onCredentialManagerAuthenticated(credentialManager, _token) {